<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>组织结构添加页面</title>
  <link rel="stylesheet" href="../../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../../yl/style.css">
  <link rel="stylesheet" href="../../../style/wangeditor.css">
  <link rel="stylesheet" href="../../../yl/mobile.css" />
  <link rel="stylesheet" href="../../../yl/easyui.css" />
  <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">{{action=='Add'?'添加政府组织结构':action=='Modify'?'修改政府组织结构':''}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'government_agencies', 'form': 'dataForm' ,'primary_key':'Government_Agencies_SerialNumber' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">政府组织结构信息</div>
        </div>
        <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">政府机构编码</div>
              </template>
              <el-form-item prop="Government_Agencies_SerialNumber" :rules="[{ required: true, message: '请输入政府机构编码', trigger: 'blur' }]">
                <el-input v-model="dataForm.Government_Agencies_SerialNumber" class="borderless-input" placeholder="请输入政府机构编码" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">父级结构</div>
              </template>
              <el-form-item prop="Parent_Number">
                <!-- :disabled="nodeKey&&action=='Add'" -->
                <el-select  clearable @change="changeAgencies" v-model.trim="dataForm.Parent_Number" placeholder="请选择父级结构" filterable
                  style="width: 100%">
                  <el-option v-for="(item,index) in agencies.filter(i=>action=='Modify'&&this.dataForm.Government_Agencies_SerialNumber!=i.Government_Agencies_SerialNumber||action=='Add')" :key="index" :label="item.Agensies_Name"
                    :value="item.Government_Agencies_SerialNumber"></el-option>
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">政府机构名称</div>
              </template>
              <el-form-item prop="Agensies_Name" :rules="[{ required: true, message: '请输入政府机构名称', trigger: 'blur' }]">
                <el-input v-model="dataForm.Agensies_Name" class="borderless-input" placeholder="请输入政府机构名称" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">政府机构地址</div>
              </template>
              <el-form-item prop="Agensies_Address" :rules="[{ required: true, message: '请输入政府机构名称', trigger: 'blur' }]">
                <el-input v-model="dataForm.Agensies_Address" class="borderless-input" placeholder="请输入政府机构地址" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">机构所在地坐标集</div>
              </template>
              <el-form-item prop="Agensies_Coords"  :rules="[{ required: true, validator:IS_Coords, trigger: 'blur' }]">
                <el-input type="textarea" :autosize="{ minRows: 2}" v-model="dataForm.Agensies_Coords"
                  class="borderless-input" placeholder="请输入机构所在地坐标集" />
              </el-form-item>
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
      </div>
      
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" plain @click="handleSubmit" :loading="loading">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/add.js"></script>

</html>